/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.spreedairy.portal.service.impl;

import com.spreedairy.portal.NoSuchCustomFieldException;
import com.spreedairy.portal.model.CustomField;
import com.spreedairy.portal.service.base.CustomFieldLocalServiceBaseImpl;
import com.spreedairy.portal.service.persistence.CustomFieldUtil;

/**
 * The implementation of the custom field local service.
 *
 * <p>
 * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link com.spreedairy.portal.service.CustomFieldLocalService} interface.
 *
 * <p>
 * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
 * </p>
 *
 * @author SpreeDairy
 * @see com.spreedairy.portal.service.base.CustomFieldLocalServiceBaseImpl
 * @see com.spreedairy.portal.service.CustomFieldLocalServiceUtil
 */
public class CustomFieldLocalServiceImpl extends CustomFieldLocalServiceBaseImpl {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never reference this interface directly. Always use {@link com.spreedairy.portal.service.CustomFieldLocalServiceUtil} to access the custom field local service.
	 */
	public java.util.List<CustomField> findByCategoryId(long categoryId)
	throws com.liferay.portal.kernel.exception.SystemException,
	NoSuchCustomFieldException{
	return CustomFieldUtil.findByCategoryId(categoryId);
	}

	public CustomField findByCategoryIdFieldOrder(long categoryId,int fieldOrder)
	throws com.liferay.portal.kernel.exception.SystemException,
	NoSuchCustomFieldException{
	return CustomFieldUtil.findByCategoryIdFieldOrder(categoryId,fieldOrder);
	}

	/*public List<JournalTemplate> getTemplets(String viewType) throws PortalException,
	com.liferay.portal.kernel.exception.SystemException{
		//ClassLoader loader = PortalClassLoaderUtil.getClassLoader();
	return (List<JournalTemplate>) EcustomFieldFinderUtil.getTemplets(viewType, JournalTemplate.class);
	}*/

	/*public List<JournalTemplate> getTemplets(String viewType) throws PortalException,
	com.liferay.portal.kernel.exception.SystemException{
		List<JournalTemplate> list = new ArrayList<JournalTemplate>();
		
		ClassLoader loader = PortalClassLoaderUtil.getClassLoader();
		DynamicQueryFactory fc = DynamicQueryFactoryUtil.getDynamicQueryFactory();
		DynamicQuery q = fc.forClass(JournalTemplate.class, loader);
		q.add(PropertyFactoryUtil.forName("name").like(viewType));
		list = JournalTemplateLocalServiceUtil.dynamicQuery(q);
		return list;
	}*/
}